import http from '@/utils/http'
const env = import.meta.env
const BASE_URL = env.PROD ? `${env.VITE_API_BASE_URL8}` : '/zc'

/** @desc 获取平台列表数据 */
export function platformsList(data: any) {
  return http.post(`${BASE_URL}/v1/platform/list`, data)
}

/** @desc 获取验货商品列表 */
export function goodsList(data: any) {
  return http.post(`${BASE_URL}/v1/goods/list`, data)
}

/** @desc 获取验货商品详情*/
export function goodsDetail(data: any) {
  return http.post(`${BASE_URL}/v1/goods/goodsDetail`, data)
}

/** @desc 验货商品添加*/
export function goodsAdd(data: any) {
  return http.post(`${BASE_URL}/v1/goods/create`, data)
}

/** @desc 验货商品编辑*/
export function goodsEdit(data: any) {
  return http.post(`${BASE_URL}/v1/goods/update`, data)
}

/** @desc 验货商品删除*/
export function goodsDelete(data: any) {
  return http.post(`${BASE_URL}/v1/goods/delete`, data)
}

/** @desc 订单列表*/
export function orderList(data: any) {
  return http.post(`${BASE_URL}/v1/order/list`, data)
}

/** @desc 文案审核*/
export function orderUpdateInspectComment(data: any) {
  return http.post(`${BASE_URL}/v1/order/updateInspectComment`, data)
}

/** @desc 文案一键审核*/
export function batchUpdateInspectComment(data: any) {
  return http.post(`${BASE_URL}/v1/order/batchUpdateInspectComment`, data)
}

/** @desc 优质评论*/
export function isHighQuality(data: any) {
  return http.post(`${BASE_URL}/v1/order/isHighQuality`, data)
}

/** @desc 一键发货 */
export function orderUpdateDeliveryInfo(data: any) {
  return http.post(`${BASE_URL}/v1/order/updateDeliveryInfo`, data)
}

/** @desc 黑名单列表 */
export function inspectBlackList(data: any) {
  return http.post(`${BASE_URL}/v1/inspectBlackList/list`, data)
}

/** @desc 黑名单状态更新 */
export function inspectBlackEdit(data: any) {
  return http.post(`${BASE_URL}/v1/inspectBlackList/update`, data)
}

/** @desc 验货规则详情 */
export function inspectCommentRuleDetail(data: any) {
  return http.post(`${BASE_URL}/v1/inspectCommentRule/detail`, data)
}

/** @desc 验货规则新增 */
export function inspectCommentRuleAdd(data: any) {
  return http.post(`${BASE_URL}/v1/inspectCommentRule/create`, data)
}

/** @desc 验货规则修改 */
export function inspectCommentRuleEdit(data: any) {
  return http.post(`${BASE_URL}/v1/inspectCommentRule/update`, data)
}

/** @desc 快递公司列表 */
export function deliveryList(data: any) {
  return http.get(`${BASE_URL}/v1/common/delivery/list`, data)
}

/** 订单导出 */
export function inspectOrderExport(params: any) {
  return http.post(`${BASE_URL}/v1/order/export`, params, {}, 'blob')
}

/** 订单导入 */
export function inspectOrderImport(params: any) {
  return http.post(`${BASE_URL}/v1/order/import`, params, {}, 'blob')
}

/** 热销商品列表 */
export function inspectHotGoodsList(params: any) {
  return http.post(`${BASE_URL}/v1/hot/goods/list`, params)
}

/** 热销商品直接添加 */
export function inspectHotGoodsAdd2(params: any) {
  return http.post(`${BASE_URL}/v1/hot/goods/createGoods`, params)
}

/** 热销商品创建 */
export function inspectHotGoodsAdd(params: any) {
  return http.post(`${BASE_URL}/v1/hot/goods/create`, params)
}

/** 热销商品编辑 */
export function inspectHotGoodsEdit(params: any) {
  return http.post(`${BASE_URL}/v1/hot/goods/update`, params)
}

/** 热销商品统计 */
export function inspectHotGoodsStatistics(params: any) {
  return http.get(`${BASE_URL}/v1/hot/goods/statistics`, params)
}

/** 热销商品统计 */
export function inspectHotGoodsUserStatistics(params: any) {
  return http.post(`${BASE_URL}/v1/hot/goods/userStatistics`, params)
}

/** 热销商品统计 */
export function inspectHotGoodsDetailStatistics(params: any) {
  return http.post(`${BASE_URL}/v1/hot/goods/detailStatistics`, params)
}

/** 商品导出 */
export function inspectGoodsExport(params: any) {
  return http.post(`${BASE_URL}/v1/goods/export`, params, {}, 'blob')
}

/** 轮播图-列表 */
export function inspectResourceList(params: any) {
  return http.post(`${BASE_URL}/v1/resource/position/list`, params)
}

/** 轮播图-新增 */
export function inspectResourceAdd(params: any) {
  return http.post(`${BASE_URL}/v1/resource/position/create`, params)
}

/** 轮播图-编辑 */
export function inspectResourceEdit(params: any) {
  return http.post(`${BASE_URL}/v1/resource/position/update`, params)
}

/** 轮播图-删除 */
export function inspectResourceDelete(params: any) {
  return http.post(`${BASE_URL}/v1/resource/position/delete`, params)
}

/** 弹窗-列表 */
export function inspectPopupList(params: any) {
  return http.post(`${BASE_URL}/v1/pop/resource/position/list`, params)
}

/** 弹窗-新增 */
export function inspectPopupAdd(params: any) {
  return http.post(`${BASE_URL}/v1/pop/resource/position/create`, params)
}

/** 弹窗-编辑 */
export function inspectPopupEdit(params: any) {
  return http.post(`${BASE_URL}/v1/pop/resource/position/update`, params)
}

/** 弹窗-删除 */
export function inspectPopupDelete(params: any) {
  return http.post(`${BASE_URL}/v1/pop/resource/position/delete`, params)
}

/** @desc 获取商品详情*/
export function goodsDetail2(data: any) {
  return http.post(`${BASE_URL}/goods/goods/goodsDetail`, data)
}
